package com.xie.o2o.dto;

import com.xie.o2o.entity.ProductCategory;
import com.xie.o2o.enums.ProductCategoryStateEnum;

import java.util.List;

/**
 * @create: xie
 */
public class ProductCategoryExecution {
    //结果状态
    private int state;
    //状态标识
    private String stateInfo;
    private List<ProductCategory> productCategories;

    public ProductCategoryExecution() {
    }
    //失败时的构造方法
    public ProductCategoryExecution(ProductCategoryStateEnum productCategoryStateEnum) {
        this.state = productCategoryStateEnum.getState();
        this.stateInfo = productCategoryStateEnum.getStateInfo();
    }
    //成功时的构造方法
    public ProductCategoryExecution(int state, String stateInfo, List<ProductCategory> productCategories) {
        this.state = state;
        this.stateInfo = stateInfo;
        this.productCategories = productCategories;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public List<ProductCategory> getProductCategories() {
        return productCategories;
    }

    public void setProductCategories(List<ProductCategory> productCategories) {
        this.productCategories = productCategories;
    }
}
